﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Comments_Suggestions.aspx.cs" Inherits="WeChat.Comments_Suggestions" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <title>自定义标题</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="default" />
    <meta http-equiv="cache-control" content="no-transform" />
    <meta content="telephone=no" name="format-detection" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <link href="css/Comments.css" rel="stylesheet" type="text/css" />
    <%--    <script src="js/jquery.min.js"></script>--%>
    <script src="js/jquery-1.11.0.min.js"></script>
    <script src="layer/layer.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {

            // $('label').click(function () {
            $(this).delegate("label", "click", function () {
                if ($(this).children('input').is(":checked")) {
                    //$(this).css('background-color', '#f7edb8');
                    $(this).css('background-color', '#576ffe');
                    $(this).css('color', '#fff');
                    $(this).nextAll().css('background-color', '#f8fbf9');
                    $(this).prevAll().css('background-color', '#f8fbf9');
                    $(this).nextAll().css('color', '#576ffe');
                    $(this).prevAll().css('color', '#576ffe');
                }
                //if ($(this).children('input').is(":checked")) {
                //    $(this).css('background-color', '#f7edb8');
                //    $(this).nextAll().css('background-color', '#f8fbf9');
                //    $(this).prevAll().css('background-color', '#f8fbf9');
                //}
            })

            getMyCookie();
        })
        function getMyCookie() {

            var url = decodeURI(window.location.href);
            var aa = url.indexOf('=');
            if (aa > -1) {
                url = url.substring(aa + 1);

            }

            $.ajax({
                type: "post",
                url: "../MenuReserveHandler.ashx",
                data: { jh: url, funcname: "SelTitle_Publish" },
                dataType: "json",
                success: function (data) {
                    var json = JSON.parse(data.rows);
                    $("#menu").empty();
                    $("#menu").append(InitList(json));

                }
            })
        }
        var id = "";
        $(function () {
            //$("#btn").on("click",function(){
            //   jump1();
            //});
            $("#menu").on("click", "li[class='edit[]']", function (event) {
               
                id = $(this).attr("id");
               jump1();
            });
        });
 
        function jump1(){
            url = "Title_Publish.aspx?id=" + id;//此处拼接内容
            window.location.href = url;
        }


        function myrefresh() {
            window.location.reload();
        }
        var str = '';
        var num = '';
        //提交问卷调查，获取机号，id值，选项！
        //function Findings() {
        //    $('label').children("input[type='radio']:checked").each(function () {
        //        //str += $(this).val() + ",";
        //        str += $(this).attr("value") + ",";
        //        num += $(this).attr("data") + ",";
        //    });
        //    //请求方法
        //    $.ajax({
        //        type: "post",
        //        url: "../MenuReserveHandler.ashx",
        //        data: {
        //            questionCode: str,
        //            content: num,
        //            questionjh: jh,
        //            funcname: "FindingsAdd"
        //        },
        //        dataType: "json",
        //        success: function (data) {
        //            if (data <= 0) {
        //                layer.msg("问卷调查添加失败！", { icon: 2 });
        //                return false;
        //            } else {
        //                layer.msg("问卷调查添加成功！", { icon: 1 });
        //                //指定1秒刷新一次 
        //                setTimeout('myrefresh()', 2000);
        //            }
        //        }

        //    })
        //}


        //生成菜单列表
        var jh = "";
        function InitList(json) {
            debugger;
            var s = "";
            var Num = 0;
            var name = "";
            var for01 = "";
            var for02 = "";
            var for03 = "";
            var for04 = "";
            var for05 = "";
            var id01 = "";
            var id02 = "";
            var id03 = "";
            var id04 = "";
            var id05 = "";

            for (var i = 0; i < json.length; i++) {
                Num++;

                name = "opption" + Num.toString();
                for01 = "excellent" + Num.toString();
                for02 = "Very nice" + Num.toString();
                for03 = "good" + Num.toString();
                for04 = "soso" + Num.toString();
                for05 = "bad" + Num.toString();
                id01 = "excellent" + Num.toString();
                id02 = "Very nice" + Num.toString();
                id03 = "good" + Num.toString();
                id04 = "soso" + Num.toString();
                id05 = "bad" + Num.toString();
                jh = json[i].questionjh;

                //  s += "<li><span>" + Num + ". " + json[i].questionName + "：</span><div class='big'><label for='" + for01 + "' id='c1'> <input name='" + name + "' type='radio' id='" + id01 + "' value='" + json[i].questionCode + "'/>" + json[i].optionA + "</label> <label for='" + for02 + "' id='c1'>  <input name='" + name + "' type='radio' id='" + id02 + "' value='" + json[i].questionCode + "'/>" + json[i].optionB + "</label> <label for='" + for03 + "' id='c1'> <input name='" + name + "' type='radio' id='" + id03 + "' value='" + json[i].questionCode + "'/>" + json[i].optionC + "</label><label for='" + for04 + "' id='c1'><input name='" + name + "' type='radio' id='" + id04 + "' value='" + json[i].questionCode + "'/>" + json[i].optionD + "</label> <label for='" + for05 + "' id='c1'><input name='" + name + "' type='radio' id='" + id05 + "' value='" + json[i].questionCode + "'/>" + json[i].optionE + "</label> </div></li>";
                //s += "<li><span>" + json[i].CustomTitle + "：</span></li>";
               // s += "<li><span><a href='javascript:void(0)' id='" + json[i].CustomCode + "' class='edit[]' style='margin-right:10px;color: #576ffe;'>" + json[i].CustomTitle + "</a></span></li>";
                s += "<li id='" + json[i].CustomCode + "' class='edit[]' style='margin-right:10px;'>" + json[i].CustomTitle + "</li>";
            }
            return s;
        }

    </script>
    <style>
        input[type="radio"] {
            position: absolute;
            left: -999em;
        }

            input[type="radio"] + label:before {
                background-position: -20px -21px;
            }

            input[type="radio"]:checked + label:before {
                background-position: -20px 2px;
            }

        /*.text1{
            width: 100%;
            height: 100%;
            position: fixed;
            z-index: -10;
            background-image: url(img/beijing.png);
            background-repeat: no-repeat;
            background-position: 0px 0px;
            background-size: 100% 100%;
            }*/

        /*背景颜色设计*/
        .div {
            width: 100%;
            height: auto;
            z-index: -10;
            /*background-image: url(img/beijingse01.jpg);*/
            background-color: #fff;
            background-repeat: no-repeat;
            background-position: 0px 0px;
            background-size: 100% 100%;
        }

        .text1 {
            width: 90%;
            margin: 0 auto;
        }

        .h2 {
            width: 90%;
            margin: 0 auto;
            text-align: center;
            /*color: #576ffe;*/
            color: #576ffe;
            font-size: 80px;
            font-weight: bold;
        }

        .big {
            width: 100%;
            display: block;
            height: 44px;
            line-height: 44px;
            margin-bottom: 0%;
        }

        .w1 {
            width: 100%;
            height: 20px
        }

            .w1 img {
                width: 100%;
            }


        #c1 {
            background: #f8fbf9;
            /*color: #8b5c2b;*/
            color: #576ffe;
            width: 18%;
            text-align: center;
            font-size: 16px;
            border: #eaeaea 1px solid;
            height: 70px;
            line-height: 70px;
            display: block;
            float: left;
            margin-right: 1.4%;
            border-radius: 2px;
            box-shadow: 1px 1px #eaeaea;
            font-size: 50px;
        }

        /*.text1 ul li{
            border:1px solid #000000;
            line-height:80px;
        }*/

      /*.text1 ul li:nth-of-type(odd)
      { 
          color: #f61818;

      }  
     .text1 ul li:nth-of-type(even)
       {
           color:#576ffe;
       }*/ 
       .text1 ul li{
            display: block;
            /*color: #576ffe;*/
            /*color: #8b5c2b;*/
            margin-bottom: 10%;
            font-size: 60px;
            font-weight: bold;
            color:#576ffe;
            border:0px solid #000000;
            line-height:normal;
            border-bottom:5px solid #576ffe;  
        }

        .text1 ul li span a{
            display: block;
            /*color: #576ffe;*/
            /*color: #8b5c2b;*/
            margin-bottom: 5%;
            font-size: 60px;
            font-weight: bold;
        }
        .text1 ul li span a:hover {
            text-decoration:underline;
            color:#ff0000;
        }

        .btn1 a {
            background: #576ffe;
            width: 300px;
            height: 130px;
            display: block;
            margin: 0 auto;
            text-align: center;
            line-height: 130px;
            letter-spacing: 3px;
            color: #fff;
            box-shadow: 1px 1px #bfbfbf;
            font-size: 50px;
        }

        @media screen and (max-width: 320px) { /*iphone5s */
            #c1 {
                width: 18%;
                margin-right: 1.3%;
            }
        }

        @media screen and (max-width: 320px) and (max-height: 480px) { /*iphone4s */
            #c1 {
                width: 18%;
                margin-right: 1.3%;
            }
        }
    </style>

</head>
<body class="body">
    <div class="div">
        <div class="bgg1"></div>
        <div class="lauguage1"></div>
        <%--    <h2 style="align-content:center;">
        <img src="img/slogan1.png" />
        问卷调查
    </h2><hr/>--%>
        <div class="text1">
            <br />
            <br />
            <%--<h1 class="h2"><%=Custom_Information %></h1>--%>
            <br /><br /><br /><br />
            <ul id="menu">

            </ul>

        </div>

        <%--    <div class="please">
        如您对我们有什么建议，非常欢迎您向我们提出，我们会非常珍视每一位顾客的意见。
    </div>
    <div class="suggest_nr">
        <textarea name="" placeholder=" 请输入… "></textarea>
    </div>--%>
<%--        <br />
        <br />
        <div class="btn1">
            <a href="javascript:void" onclick="Findings()">提　交</a>
        </div>--%>

    </div>
</body>
</html>
